package model.dao;

import java.util.List;

import model.bo.News;

public interface INewsDAO {

	// property constants
	public static final String TITLE = "title";

	public static final String BODY = "body";

	public abstract void save(News transientInstance);

	public abstract void delete(News persistentInstance);

	public abstract News findById(java.lang.Integer id);

	public abstract List findByExample(News instance);

	public abstract List findByProperty(String propertyName, Object value);

	public abstract List findByTitle(Object title);

	public abstract List findByBody(Object body);

	public abstract List findAll();

	public abstract News merge(News detachedInstance);

	public abstract void attachDirty(News instance);

	public abstract void attachClean(News instance);
	
	public int execusql(String sql);
	
	public int getAllRowCount(String hql);
	
	public List queryForPage(final String hql, final int offset,final int length);

}